#ifndef __ESP8266_H__
#define __ESP8266_H__

#include <stdint.h>

typedef struct{
	char tbuff[1024];
	char rbuff[1024];
	uint16_t tlen;
	uint16_t rlen;
	char SSID[64];
	char PASSWD[64];
    char ServerIP[16];
    uint16_t ServerPort;
	uint32_t wifi_mode;
    int32_t ret;
}esp8266_t;

int32_t esp8266_init(esp8266_t*p,uint32_t timeout);
int32_t esp8266_connect_modbusserver(esp8266_t*p,uint32_t timeout);

#endif
